home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Freeware / Gobby 0.4.7 / gobby-0.4.7.exe / {app} / share / gtksourceview-2.0 / language-specs / ada.lang next >
Extensible Markup Language  |  2008-09-09  |  7KB  |  221 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3.  
  4.  Author: Gustavo Gir├íldez <gustavo.giraldez@gmx.net>
  5.  Copyright (C) 2003 Gustavo Gir├íldez <gustavo.giraldez@gmx.net>
  6.  Copyright (C) 2003 Michael Terry <mike@mterry.name>
  7.  Copyright (C) 2004 Beno├«t Dejean <tazforever@dlfp.org>
  8.  
  9.  This library is free software; you can redistribute it and/or
  10.  modify it under the terms of the GNU Library General Public
  11.  License as published by the Free Software Foundation; either
  12.  version 2 of the License, or (at your option) any later version.
  13.  
  14.  This library is distributed in the hope that it will be useful,
  15.  but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  17.  Library General Public License for more details.
  18.  
  19.  You should have received a copy of the GNU Library General Public
  20.  License along with this library; if not, write to the
  21.  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  22.  Boston, MA 02111-1307, USA.
  23.  
  24. -->
  25. <language id="ada" _name="Ada" version="2.0" _section="Sources">
  26.   <metadata>
  27.     <property name="mimetypes">text/x-ada;text/x-adasrc</property>
  28.     <property name="globs">*.adb;*.ads</property>
  29.     <property name="line-comment-start">--</property>
  30.   </metadata>
  31.  
  32.   <styles>
  33.     <style id="comment" _name="Comment" map-to="def:comment"/>
  34.     <style id="string" _name="String" map-to="def:string"/>
  35.     <style id="keyword" _name="Keyword" map-to="def:keyword"/>
  36.     <style id="decimal" _name="Decimal number" map-to="def:decimal"/>
  37.     <style id="boolean" _name="Boolean value" map-to="def:boolean"/>
  38.     <style id="storage-class" _name="Storage Class" map-to="def:type"/>
  39.     <style id="type" _name="Data Type" map-to="def:type"/>
  40.     <style id="preprocessor" _name="Preprocessor" map-to="def:preprocessor"/>
  41.     <style id="base-n-number" _name="Arbitrary base number" map-to="def:base-n-integer"/>
  42.     <style id="real" _name="Real number" map-to="def:floating-point"/>
  43.     <style id="escaped-character" _name="Escaped Character" map-to="def:special-char"/>
  44.   </styles>
  45.  
  46.   <default-regex-options case-sensitive="false"/>
  47.  
  48.   <definitions>
  49.  
  50.     <context id="line-comment" style-ref="comment" end-at-line-end="true">
  51.       <start>--</start>
  52.       <include>
  53.         <context ref="def:in-line-comment"/>
  54.       </include>
  55.     </context>
  56.  
  57.     <context id="string" style-ref="string" end-at-line-end="true">
  58.       <start>"</start>
  59.       <end>"</end>
  60.       <!-- no escapes possible except for "" = literal " -->
  61.       <include>
  62.          <context id="string-esc" style-ref="escaped-character" extend-parent="true">
  63.             <match>""</match>
  64.          </context>
  65.        </include>
  66.     </context>
  67.  
  68.     <context id="character-constant" style-ref="string">
  69.       <match>'.'</match>
  70.     </context>
  71.  
  72.     <context id="preprocessor-keyword" style-ref="preprocessor">
  73.       <keyword>package</keyword>
  74.       <keyword>pragma</keyword>
  75.       <keyword>use</keyword>
  76.       <keyword>with</keyword>
  77.     </context>
  78.  
  79.     <context id="function" style-ref="keyword">
  80.       <keyword>function</keyword>
  81.       <keyword>procedure</keyword>
  82.       <keyword>return</keyword>
  83.     </context>
  84.  
  85.     <context id="keyword" style-ref="keyword">
  86.       <keyword>abort</keyword>
  87.       <keyword>abs</keyword>
  88.       <keyword>accept</keyword>
  89.       <keyword>all</keyword>
  90.       <keyword>and</keyword>
  91.       <keyword>begin</keyword>
  92.       <keyword>body</keyword>
  93.       <keyword>case</keyword>
  94.       <keyword>declare</keyword>
  95.       <keyword>delay</keyword>
  96.       <keyword>do</keyword>
  97.       <keyword>else</keyword>
  98.       <keyword>elsif</keyword>
  99.       <keyword>end</keyword>
  100.       <keyword>entry</keyword>
  101.       <keyword>exception</keyword>
  102.       <keyword>exit</keyword>
  103.       <keyword>for</keyword>
  104.       <keyword>generic</keyword>
  105.       <keyword>goto</keyword>
  106.       <keyword>if</keyword>
  107.       <keyword>in</keyword>
  108.       <keyword>is</keyword>
  109.       <keyword>loop</keyword>
  110.       <keyword>mod</keyword>
  111.       <keyword>new</keyword>
  112.       <keyword>not</keyword>
  113.       <keyword>null</keyword>
  114.       <keyword>or</keyword>
  115.       <keyword>others</keyword>
  116.       <keyword>out</keyword>
  117.       <keyword>protected</keyword>
  118.       <keyword>raise</keyword>
  119.       <keyword>record</keyword>
  120.       <keyword>rem</keyword>
  121.       <keyword>renames</keyword>
  122.       <keyword>requeue</keyword>
  123.       <keyword>reverse</keyword>
  124.       <keyword>select</keyword>
  125.       <keyword>separate</keyword>
  126.       <keyword>subtype</keyword>
  127.       <keyword>task</keyword>
  128.       <keyword>terminate</keyword>
  129.       <keyword>then</keyword>
  130.       <keyword>type</keyword>
  131.       <keyword>until</keyword>
  132.       <keyword>when</keyword>
  133.       <keyword>while</keyword>
  134.       <keyword>xor</keyword>
  135.     </context>
  136.  
  137.     <context id="storage-class" style-ref="storage-class">
  138.       <keyword>abstract</keyword>
  139.       <keyword>access</keyword>
  140.       <keyword>aliased</keyword>
  141.       <keyword>array</keyword>
  142.       <keyword>at</keyword>
  143.       <keyword>constant</keyword>
  144.       <keyword>delta</keyword>
  145.       <keyword>digits</keyword>
  146.       <keyword>interface</keyword>
  147.       <keyword>limited</keyword>
  148.       <keyword>of</keyword>
  149.       <keyword>private</keyword>
  150.       <keyword>range</keyword>
  151.       <keyword>tagged</keyword>
  152.       <keyword>synchronized</keyword>
  153.     </context>
  154.  
  155.     <context id="type" style-ref="type">
  156.       <keyword>boolean</keyword>
  157.       <keyword>character</keyword>
  158.       <keyword>count</keyword>
  159.       <keyword>duration</keyword>
  160.       <keyword>float</keyword>
  161.       <keyword>integer</keyword>
  162.       <keyword>long_float</keyword>
  163.       <keyword>long_integer</keyword>
  164.       <keyword>priority</keyword>
  165.       <keyword>short_float</keyword>
  166.       <keyword>short_integer</keyword>
  167.       <keyword>string</keyword>
  168.     </context>
  169.  
  170.     <define-regex id="hexnum">[0-9a-f][0-9a-f_]*</define-regex>
  171.     <define-regex id="exponent">[Ee][+-]?[0-9][0-9_]*</define-regex>
  172.  
  173.     <context id="based-numeral" style-ref="base-n-number">
  174.       <match extended="true">
  175.         (?<![\w\.])
  176.         [0-9][0-9_]*\#\%{hexnum}(\.\%{hexnum})?\#\%{exponent}?
  177.         (?![\w\.])
  178.       </match>
  179.     </context>
  180.  
  181.     <context id="real" style-ref="real">
  182.       <match extended="true">
  183.         (?<![\w\.])
  184.         [0-9][0-9_]*\.[0-9][0-9_]*\%{exponent}?
  185.         (?![\w\.])
  186.       </match>
  187.     </context>
  188.  
  189.     <context id="number" style-ref="decimal">
  190.       <match extended="true">
  191.         (?<![\w\.])
  192.         [0-9][0-9_]*(E[+]?[0-9][0-9_]*)?
  193.         (?![\w\.])
  194.       </match>
  195.     </context>
  196.  
  197.     <context id="boolean" style-ref="boolean">
  198.       <keyword>true</keyword>
  199.       <keyword>false</keyword>
  200.     </context>
  201.  
  202.     <context id="ada">
  203.       <include>
  204.         <context ref="line-comment"/>
  205.         <context ref="string"/>
  206.         <context ref="character-constant"/>
  207.         <context ref="preprocessor-keyword"/>
  208.         <context ref="function"/>
  209.         <context ref="keyword"/>
  210.         <context ref="storage-class"/>
  211.         <context ref="type"/>
  212.         <context ref="based-numeral"/>
  213.         <context ref="real"/>
  214.         <context ref="number"/>
  215.         <context ref="boolean"/>
  216.       </include>
  217.     </context>
  218.  
  219.   </definitions>
  220. </language>
  221.